package cn.mldn.homework.collect;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Iterator;

public class Client
{	
	public static void main(String[] args)
	{
		ArrayList<Student> studentList = new ArrayList<>();
		ArrayList<Score> mathScoreList = new ArrayList<>();
		ArrayList<Score> javaScoreList = new ArrayList<>();
		ArrayList<Score> softwareScoreList = new ArrayList<>();
		
		Util util=new Util();
		
		studentList=util.initStudent();
		mathScoreList=util.initScore("高数");
		javaScoreList=util.initScore("java程序设计");
		softwareScoreList=util.initScore("软件工程");
		
		DecimalFormat df =new DecimalFormat("#0.00");
		
		System.out.println("高数平均分为："+df.format(util.computeAverageScore(mathScoreList))+"  最高分为："+util.computeMaxScore(mathScoreList)
		+"  最低分为："+util.computeMinScore(mathScoreList));
		System.out.println("java程序设计："+df.format(util.computeAverageScore(javaScoreList))+"  最高分为："+util.computeMaxScore(javaScoreList)
		+"  最低分为："+util.computeMinScore(javaScoreList));
		System.out.println("软件工程："+df.format(util.computeAverageScore(softwareScoreList))+"  最高分为："+util.computeMaxScore(softwareScoreList)
		+"  最低分为："+util.computeMinScore(softwareScoreList));
		
		util.listStudentScore("021", mathScoreList, javaScoreList, softwareScoreList);
		util.listStudentScore("034", mathScoreList, javaScoreList, softwareScoreList);
		
		

	}

}
